package com.ngovanhau.justsort;



import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.engine.camera.Camera;
import org.anddev.andengine.engine.options.EngineOptions;
import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.ui.activity.BaseGameActivity;

import com.ngovanhau.justsort.item.config.MyConfig;

import android.content.Context;
import android.os.Bundle;

public class Game extends BaseGameActivity {

	public Camera camera = null;
	public Context context;
	public Engine engine = null;
	public Scene scene = null;

	@Override
	protected void onCreate(Bundle pSavedInstanceState){
		super.onCreate(pSavedInstanceState);
		this.context = this;
	}

	@Override
	public Engine onLoadEngine() {
		this.camera = new Camera(0, 0, MyConfig.SCREENWIDTH, MyConfig.SCREENHEIGHT);
		this.engine = new Engine(new EngineOptions(true, MyConfig.ScreenOrientation_Default, new RatioResolutionPolicy(MyConfig.SCREENWIDTH, MyConfig.SCREENHEIGHT), this.camera).setNeedsMusic(true).setNeedsSound(true));
		return engine;
	}

	@Override
	public void onLoadResources() {
		// TODO Auto-generated method stub

	}

	@Override
	public Scene onLoadScene() {
		scene = new Scene();
		scene.setOnSceneTouchListenerBindingEnabled(true);
		scene.setTouchAreaBindingEnabled(true);
		return this.scene;
	}

	@Override
	public void onLoadComplete() {
		// TODO Auto-generated method stub

	}

}
